package com.macrounion.atv.dto.req;

import javafx.beans.binding.BooleanExpression;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassNamebatchChannelReqDto
 * @Description TODO
 * @Author Administrator
 * @Date 2020/11/16 14:36
 * @Version 1.0
 **/
public class BatchChannelReqDto {
    private BigDecimal xishu;
    private String unit;
    private String yuansu;
    private Integer historyData;//0-历史数据不输出，1输出
    private Integer alarmData;//0-报警数据不输出，1输出
    private BigDecimal min;
    private BigDecimal max;
    private String norvalue;
    private List<String> ids;

    public BigDecimal getXishu() {
        return xishu;
    }

    public void setXishu(BigDecimal xishu) {
        this.xishu = xishu;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getYuansu() {
        return yuansu;
    }

    public void setYuansu(String yuansu) {
        this.yuansu = yuansu;
    }

    public Integer getHistoryData() {
        return historyData;
    }

    public void setHistoryData(Integer historyData) {
        this.historyData = historyData;
    }

    public Integer getAlarmData() {
        return alarmData;
    }

    public void setAlarmData(Integer alarmData) {
        this.alarmData = alarmData;
    }

    public BigDecimal getMin() {
        return min;
    }

    public void setMin(BigDecimal min) {
        this.min = min;
    }

    public BigDecimal getMax() {
        return max;
    }

    public void setMax(BigDecimal max) {
        this.max = max;
    }

    public String getNorvalue() {
        return norvalue;
    }

    public void setNorvalue(String norvalue) {
        this.norvalue = norvalue;
    }

    public List<String> getIds() {
        return ids;
    }

    public void setIds(List<String> ids) {
        this.ids = ids;
    }


    public Boolean isUpdateNull(){
        Boolean flag=true;
        if(this.xishu==null && StringUtils.isEmpty(this.unit) && StringUtils.isEmpty(this.yuansu)
            && this.historyData==null && this.alarmData==null && this.min==null && this.max==null
            && StringUtils.isEmpty(this.norvalue))
            flag=false;
        return flag;
    }
}
